import request from '@/utils/request'

// 分配巡检人可选时间段
export function getProInspectoTransferByProId(proId) {
  return request({
    url: `/sys/proInspectoTransferApi/getProInspectoTransferByProId/${proId}`,
    method: 'get'
  })
}

// 分配巡检人
export function addInspectoPerson(data) {
  return request({
    url: '/supervise/inspectorProjectApi/addSave',
    method: 'post',
    data: data
  })
}

// 监管单位查询指定项目下巡检企业信息
export function distributionEnterprise(params) {
  return request({
    url: '/sys/proInspectoTransferApi/selectEnterpriseBySupervise',
    method: 'post',
    params
  })
}

// 项目分配巡检单位
export function EnterpriseBySupervise(params) {
  return request({
    url: '/sys/proInspectoTransferApi/selectEnterpriseBySuperviseNoPermission',
    method: 'post',
    params
  })
}

// 企业记录
export function enterpriseRecord(params) {
  return request({
    url: '/supervise/inspectionRecordApi/selectInspectionRecordByEnterpriseId',
    method: 'post',
    params
  })
}

//  勘察企业查询指定项目下的分配人员信息
export function distributionPerson(params) {
  return request({
    url: '/sys/user/listInspectorProject',
    method: 'post',
    params
  })
}

//  项目分配巡检人员
export function InspectorProjectPerson(params) {
  return request({
    url: '/sys/user/listInspectorProjectNoPermission',
    method: 'post',
    params
  })
}

export function personRecord(params) {
  return request({
    url: '/supervise/inspectionRecordApi/selectInspectionRecordByUser',
    method: 'post',
    params
  })
}
